import { createPinia } from 'pinia'
import { createUnistorage } from 'pinia-plugin-unistorage'
import { createSSRApp } from 'vue'

import App from './App.vue'
import router from './router'
import 'virtual:uno.css'

const pinia = createPinia()
pinia.use(createUnistorage())

export function createApp() {
  const app = createSSRApp(App)

  app.use(router)

  app.use(pinia)

  return {
    app,
    pinia,
  }
}
